﻿<UserControl x:Class="RStein.PosterousReader.WP.Views.LoginView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    xmlns:controlex="clr-namespace:RStein.PosterousReader.WP.UI"
    xmlns:behaviors="clr-namespace:RStein.PosterousReader.WP.Behaviors"
    xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
    d:DesignHeight="480" d:DesignWidth="480">
    
    <Grid x:Name="LayoutRoot" Background="{StaticResource PhoneChromeBrush}">
        <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
            <StackPanel Grid.Row="0">
                <StackPanel Orientation="Vertical">
                    <TextBlock x:Name="lblUserName" Text="Uživatelské jméno" Style="{StaticResource PhoneTextNormalStyle}"  HorizontalAlignment="Left"/>
                    <TextBox Name="txtName" Width="500" HorizontalAlignment="Left" Text="{Binding UserName, Mode=TwoWay}"  behaviors:TextboxPasswordAttachedProperties.TextBoxChangedAction= "{Binding TextChangedAction}">
                        <i:Interaction.Behaviors>
                            <behaviors:TextBoxTextChangedUpdateSourceBehavior/>
                        </i:Interaction.Behaviors>
                    </TextBox>
                </StackPanel>

                <StackPanel Orientation="Vertical">
                    <TextBlock x:Name="lblPassword" Text="Heslo" Style="{StaticResource PhoneTextNormalStyle}" HorizontalAlignment="Left"/>
                    <PasswordBox Name="txtPassword" Width="500" HorizontalAlignment="Left" Password="{Binding UserPassword, Mode=TwoWay}" behaviors:TextboxPasswordAttachedProperties.TextBoxChangedAction = "{Binding TextChangedAction}" >
                        <i:Interaction.Behaviors>
                            <behaviors:PasswordTextChangedBehavior/>
                        </i:Interaction.Behaviors>
                    </PasswordBox>
                </StackPanel>

                <controlex:ButtonEx Content="Přihlásit se" Command="{Binding LoginCommand}" IsEnabled="{Binding LoginCommand.CanExecuteCommand}"></controlex:ButtonEx>

            </StackPanel>
        </Grid>
        <Ellipse Grid.Row="1" Height="100" HorizontalAlignment="Left" Margin="476,72,0,0" Name="ellipse1" Stroke="Black" StrokeThickness="1" VerticalAlignment="Top" Width="200" />
    </Grid>
    
</UserControl>
